{% extends "base.html" %}
{% block head %}
    问题主页
{% endblock  %}

{% block content %}
    <ol class="breadcrumb" style="margin-bottom: 0;">
        <li><a href="#">问题管理</a></li>
        <li class="active">问题列表</li>
    </ol>
    <div>

        <div class="clearfix"  style="height: 36px;line-height: 35px;padding: 0 15px;border-top: 1px solid #dddddd;background-color: #f1f0f0;">
            <i class="fa fa-table" aria-hidden="true"></i>
            <a target="_blank" href="{% url "question:create_question" %}"
               style="display: inline-block;padding:0 10px;background-color: #428bca;color: #ffffff;float: right">
                <i class="fa fa-plus-circle" aria-hidden="true"></i>
                创建反馈问题
            </a>
        </div>

        <table class="table table-bordered">
            <thead>
            <tr>
                <th>问题标题</th>
                <th>状态</th>
                <th>创建时间</th>
                <th>处理人</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            {% for row in result %}
                <tr>
                    <td>{{ row.title }}</td>
                    <td>{{ row.get_status_display }}</td>
                    <td>{{ row.ctime }}</td>
                    <td>{{ row.processer.username }}</td>
                    <td>
                        <a class="btn btn-danger btn-xs">
                            <i class="fa fa-times" aria-hidden="true"></i>
                            删除
                        </a>
                        |
                        <a class="btn btn-primary btn-xs" href="/questions/edit-{{ row.id }}">
                            <i class="fa fa-pencil-square-o" aria-hidden="true"></i>
                            编辑
                        </a>
                    </td>
                </tr>
            {% endfor %}

            </tbody>
        </table>
        <div class="clearfix">
            <ul class="pagination right" style="margin-top: 0">
               {{ page_str }}
            </ul>
        </div>
    </div>
{% endblock %}